package com.example.demo.mq;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import javax.swing.plaf.SpinnerUI;

@Component//监听QueueHello的消息队列
@RabbitListener(queues = "Queue1")
public class ReceiverA {
    //@RabbitHandler来实现具体的消费
    @RabbitHandler
    public void QueueReceiver(String Queue1){
        System.out.println("ReceiverA:"+Queue1);
    }
}
